<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.js"></script>
</head>
<body>
    <button>设置样式1</button>
    <button>设置样式2</button>
    <button>获取样式</button>
    <div class="box"></div>
    <script>
        $(function(){
            $("button").eq(0).click(function(){
                $(".box").css("width",200).css("height",200).css("backgroundColor","red");
            })
            $("button").eq(1).click(function(){
                $(".box").css({
                    width:400,
                    height:400,
                    backgroundColor:"yellow"
                })
            })
            $("button").eq(2).click(function(){
                console.log($(".box").css("width"));
            })
    })
    </script>
</body>
</html>